﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;

namespace SpellChecker.Logic
{
    public class Leerzeichenverarbeiter
    {
        public List<string> SplitIntoWords(string CleanedText)
        {
            return SeperatedWords(CleanedText).ToList();
        }

        private IEnumerable<string> SeperatedWords(string CleanedText)
        {
            return Regex.Split(CleanedText.ToLower(), "[\n\r \t]", RegexOptions.IgnorePatternWhitespace);
        }
    }
}
